Skip to content

Conversation

@jekuaitk
Copy link
Contributor

@jekuaitk jekuaitk commented Jul 4, 2025

Handles #186 by ensuring submissions are not saved twice.

Important

This PR is currently aimed at the master branch since the develop branch is many features ahead and a potential patch version should be without these features.

@ds-bellcom ds-bellcom added the Incl. in the next release This issue/PR is incl. in the next release label Oct 7, 2025
@ds-bellcom ds-bellcom linked an issue Oct 7, 2025 that may be closed by this pull request
// Only manipulate element on submission create form.
if (!$webformSubmission->isCompleted()) {
if ($cprLookupResult && $cprLookupResult->isNameAddressProtected()) {
// @todo What is this used for?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes from this requirement in BKDK-550:
https://os2web.atlassian.net/browse/BKDK-550?focusedCommentId=64745

The address field needed to have a hint that it's protected/beskyttet

I see that this key is most likely custom one: #info_message i also don't see any theme using it. For me, it's same to delete this line

If that answers the questions, please remove todo comment from the code 🙂

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stankut, do you suggest removing

        $element['#info_message'] = 'adresse beskyttelse';

(along with the todo comment)?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that was my idea. Please do that while you're on it, i see no effect of this line anymore

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two lines removed in a24177e, @stankut. Please re-review.

@rimi-itk rimi-itk added the hotfix Changes targeting the main branch. label Oct 20, 2025
// Only manipulate element on submission create form.
if (!$webformSubmission->isCompleted()) {
if ($cprLookupResult && $cprLookupResult->isNameAddressProtected()) {
// @todo What is this used for?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stankut, do you suggest removing

        $element['#info_message'] = 'adresse beskyttelse';

(along with the todo comment)?

@rimi-itk rimi-itk requested a review from stankut October 21, 2025 10:26
@stankut
Copy link
Collaborator

stankut commented Oct 21, 2025

looks good to me @rimi-itk @jekuaitk

@rimi-itk rimi-itk merged commit 123d488 into master Oct 21, 2025
7 of 8 checks passed
@rimi-itk rimi-itk deleted the feature/avoid-double-save-on-name-and-address-protected-submission branch October 21, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotfix Changes targeting the main branch. Incl. in the next release This issue/PR is incl. in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Name- and address protection multiple submission saves issue

4 participants